﻿using UnityEngine;
using UnityEngine.UIElements;

namespace winS.UnityEditor.UIElement
{
    /// <summary>
    /// 标题.
    /// <para>类似 <see cref="Label"/>, 但默认粗体</para>
    /// </summary>
    public class Title : TextElement
    {
        public Title()
        {
            style.minWidth = 0f;
            style.flexShrink = 0f;
            style.minHeight = EditorElementUtility.elementMinHeight;
            style.whiteSpace = WhiteSpace.NoWrap;
            style.SetUnityFontDefinition(PackageAssets.FontSet.microsoftYahei);

            style.SetFontStyle(FontStyle.Bold);
        }
    }
}